
export default {
	install(Vue){
      //去掉字符串空格
        Vue.prototype.Trim=(str,is_global)=>{
			var  result;
		    result = str.replace(/(^\s+)|(\s+$)/g,"");
		    if(is_global.toLowerCase()=="g"){
		       result = result.replace(/\s/g,"");
		     }
		     return result;
        }
        Vue.prototype.getParam=(name)=>{
            var url = window.location.href;
            var theRequest = new Object();
            if (url.indexOf('?') != -1) {
              var strs = url.split('?');
              for (var i = 0; i < strs.length; i++) {
                if (strs[i].split('=')[0] == name) {
                  return unescape(strs[i].split('=')[1]);
                }
              }
              return '';
            }
        }
	}
}